<!DOCTYPE html>
<html lang="en" >
<head>
    <title>Atomsk - Option duplicate - Pierre Hirel</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" media="screen" type="text/css" title="Default" href="./default.css" />
    <link rel="icon" href="../img/atomsk_logo.png" type="image/png" />
</head>
   
<body>

<p><a href="./index.html">Back to main menu</a></p>

<h2>Option: duplicate</h2>

<h4>Syntax</h4>

<p><code>-duplicate &#60;Nx&#62; &#60;Ny&#62; &#60;Nz&#62;</code></p>


<h4>Description</h4>

<p>This option allows to duplicate a system in the three directions of space. It can be useful for (but not restricted to) building a supercell from a unit cell.</p>

<p>The translational vectors used to repeat the system are the base vectors of the original cell, noted <code>Hx</code>, <code>Hy</code> and <code>Hz</code>. The command-line parameters must be integers and, if they need any explanation at all:</p>

<ul>
  <li><strong>Nx</strong>: number of times the system is repeated along the first box vector <code>Hx</code>.</li>
  <li><strong>Ny</strong>: number of times the system is repeated along the second box vector <code>Hy</code>.</li>
  <li><strong>Nz</strong>: number of times the system is repeated along the third box vector <code>Hz</code>.</li>
</ul>

<p>If all values are equal to 1 then the system remains the same (since it is multiplied one time along all directions). Any value equal to 0 is automatically replaced by 1, as a zero dimension would wipe out the whole system. If a negative value is provided, then the system is mirrored along that axis, and then expanded in the direction of negative coordinates.</p>

<p>The replicas of the original system are appened to the original system. To change the order of atoms one can use the <a href="./option_sort.html">option <code>-sort</code></a>.</p>

<p>If original atoms possess auxiliary properties, the duplicate atoms have the same auxiliary properties.</p>

<p>If a selection was defined (with the <a href="./option_select.html">option <code>-select</code></a>) then only selected atoms are duplicated. After the duplication, the selection will remain the same (i.e. the duplicates of selected atoms will not be selected).</p>


<h4>Default</h4>

<p>By default the system is not duplicated.</p>



<h4>Examples</h4>

<ul>
<li><code class="command">atomsk unitcell.cfg -duplicate 2 2 4 supercell.xyz</code>
<p>This will create a 2x2x4 supercell from <code>unitcell.cfg</code>, and output it to <code>supercell.xyz</code>.</p></li>

<li><code class="command">atomsk initial.xyz -dup 6 4 0 final.cfg</code>
<p>This will duplicate the system six times along X, four times along Y, and one time along Z. Note that the "0" along the Z direction has the same meaning as "1", i.e. the system is not duplicated but still appears once along that direction.</p></li>

<li><code class="command">atomsk initial.cfg -dup -3 1 1 final.cfg</code>
<p>The system will be duplicated -3 times along X, i.e. it will be mirrored along the X direction, and then copied 3 times in the direction of negative X coordinates.</p></li>
</ul>

<p><a href="./index.html">Back to main menu</a></p>

</body>

</html>
